package cn.studyjams.s1.contest.autohello.model;

/**
 * Created by liuyang
 * on 2016/11/22.
 */


/**
 * repeatType:（如果该字段为0，后面的统统无效）
 * 0: 不重复
 * 1: 每天
 * 2: 每周
 * 3: 每月
 * 4: 每年
 * <p>
 * howOften:（默认为1）
 * 每隔 howOften 天/周/月/年
 * <p>
 * endCondition:
 * 0：一直重复下去
 * 1：直到某个日期
 * 2：执行一定次数
 * <p>
 * whichWeeks:
 * 1~7 分别代表周一到周日。当repeatType为2时，该数组不能为空。
 * <p>
 * sameDayOrSameWeekOfTheMonth
 * 0: same day
 * 1: same week
 * 当repeatType为3时，该值不能为空。
 */
public class RepeatMode {

    private int repeatType = 0;
    private int howOften = 1;
    private int endCondition = 0;
    private String endDateTime = "";
    private int endCounts = 1;

    private String whichWeeks = "";
    private int sameDayOrSameWeekOfTheMonth = 0;

    public RepeatMode() {
    }

    public RepeatMode(int repeatType, int howOften, int endCondition, String endDateTime,
                      int endCounts, String whichWeeks, int sameDayOrSameWeekOfTheMonth) {
        this.repeatType = repeatType;
        this.howOften = howOften;
        this.endCondition = endCondition;
        this.endDateTime = endDateTime;
        this.endCounts = endCounts;
        this.whichWeeks = whichWeeks;
        this.sameDayOrSameWeekOfTheMonth = sameDayOrSameWeekOfTheMonth;
    }

    public int getRepeatType() {
        return repeatType;
    }

    public void setRepeatType(int repeatType) {
        this.repeatType = repeatType;
    }

    public int getHowOften() {
        return howOften;
    }

    public void setHowOften(int howOften) {
        this.howOften = howOften;
    }

    public int getEndCondition() {
        return endCondition;
    }

    public void setEndCondition(int endCondition) {
        this.endCondition = endCondition;
    }

    public String getEndDateTime() {
        return endDateTime;
    }

    public void setEndDateTime(String endDateTime) {
        this.endDateTime = endDateTime;
    }


    public int getEndCounts() {
        return endCounts;
    }

    public void setEndCounts(int endCounts) {
        this.endCounts = endCounts;
    }

    public String getWhichWeeks() {
        return whichWeeks;
    }

    public void setWhichWeeks(String whichWeeks) {
        this.whichWeeks = whichWeeks;
    }

    public int getSameDayOrSameWeekOfTheMonth() {
        return sameDayOrSameWeekOfTheMonth;
    }

    public void setSameDayOrSameWeekOfTheMonth(int sameDayOrSameWeekOfTheMonth) {
        this.sameDayOrSameWeekOfTheMonth = sameDayOrSameWeekOfTheMonth;
    }
}
